package com.weiai.wedding.dao.file;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.weiai.wedding.entity.file.UserFile;
import com.weiai.wedding.util.Pagination;


public interface UserFileDao extends JpaRepository<UserFile, String> {
	/**
	 * 根据用户Id查询 对应用户上传的所有文件信息
	 * @param userId
	 * @return
	 */
	@Query("SELECT file FROM UserFile file WHERE file.userId=:userId")
	List<UserFile> findByUserId(@Param("userId") String userId);

}
